﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:ed="http://schemas.microsoft.com/expression/2010/drawing" xmlns:toolkit="http://schemas.microsoft.com/winfx/2006/xaml/presentation/toolkit" x:Class="P_PersonalDetails.GenderPicker"
	mc:Ignorable="d" d:DesignWidth="200" d:DesignHeight="100">
	<UserControl.Resources>
		<ResourceDictionary>
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="FormStyling.xaml"/>
			</ResourceDictionary.MergedDictionaries>

			<Style TargetType="ToggleButton" x:Key="SelectionToggleButton">
				<Setter Property="Foreground" Value="{StaticResource PurpleBrush}"/>
				<Setter Property="Padding" Value="3"/>
				<Setter Property="BorderBrush" Value="{StaticResource PurpleBrush}"/>
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="ToggleButton">
							<Grid>
								<VisualStateManager.VisualStateGroups>
									<VisualStateGroup x:Name="CommonStates">
										<VisualState x:Name="Normal"/>
										<VisualState x:Name="MouseOver">
											<Storyboard>
												<DoubleAnimation Storyboard.TargetName="HoverVisual" Storyboard.TargetProperty="Opacity" To="0.5"/>
											</Storyboard>
										</VisualState>
										<VisualState x:Name="Pressed">
											<Storyboard>
												<DoubleAnimation Storyboard.TargetName="HoverVisual" Storyboard.TargetProperty="Opacity" To="0.8"/>
											</Storyboard>
										</VisualState>
									</VisualStateGroup>
									<VisualStateGroup x:Name="CheckStates">
										<VisualState x:Name="Checked">
											<Storyboard>
												<DoubleAnimation Storyboard.TargetName="CheckedVisual" Storyboard.TargetProperty="Opacity" To="1"/>
											</Storyboard>
										</VisualState>
										<VisualState x:Name="Unchecked"/>
									</VisualStateGroup>
									<VisualStateGroup x:Name="FocusStates">
										<VisualState x:Name="Focused">
											<Storyboard>
												<DoubleAnimation Storyboard.TargetName="HoverVisual" Storyboard.TargetProperty="Opacity" To="0.8"/>
											</Storyboard>
										</VisualState>
										<VisualState x:Name="Unfocused" />
									</VisualStateGroup>
								</VisualStateManager.VisualStateGroups>
								<Path x:Name="HoverVisual" Opacity="0" Data="M37,260  C-200,278 -202,493 39,433 C280,373 123.99953,147.00021 -56.000473,231.0002" Stretch="Fill" StrokeThickness="4" Stroke="{TemplateBinding BorderBrush}" UseLayoutRounding="False"/>
								<Path x:Name="CheckedVisual" Opacity="0" Data="M37,260  C-200,278 -202,493 39,433 C280,373 123.99953,147.00021 -56.000473,231.0002" Stretch="Fill" StrokeThickness="4" Stroke="{TemplateBinding BorderBrush}" UseLayoutRounding="False"/>
								<ContentPresenter
							  x:Name="contentPresenter"
							  Content="{TemplateBinding Content}"
							  ContentTemplate="{TemplateBinding ContentTemplate}"
							  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
							  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
							  Margin="{TemplateBinding Padding}"/>
							</Grid>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style>

		</ResourceDictionary>
	</UserControl.Resources>

	<Grid x:Name="LayoutRoot">
		<Grid.ColumnDefinitions>
			<ColumnDefinition />
			<ColumnDefinition />
		</Grid.ColumnDefinitions>
		<ToggleButton x:Name="MTB" Content="Male" Style="{StaticResource SelectionToggleButton}" Checked="MaleChecked" Unchecked="MaleUnchecked" />
		<ToggleButton x:Name="FTB" Content="Female" Style="{StaticResource SelectionToggleButton}" Checked="FemaleChecked" Unchecked="FemaleUnchecked" Grid.Column="1" />
	</Grid>
</UserControl>
